﻿using System.Data.Linq.Mapping;

namespace WebGodServer.Database
{
  [Table(Name="Student")]
  class DBStudent
  {
    private long id;
    [Column(IsPrimaryKey = true, CanBeNull = false, Storage = "id", IsDbGenerated = true)]
    public long Id
    {
      get { return id; }
      set { id = value; }
    }

    private string name;
    [Column(CanBeNull = false, Storage = "name")]
    public string Name
    {
      get { return name; }
      set { name = value; }
    }

    private string surname;
    [Column(CanBeNull = false, Storage = "surname")]
    public string Surname
    {
      get { return surname; }
      set { surname = value; }
    }

    private int age;
    [Column(CanBeNull = false, Storage = "age")]
    public int Age
    {
      get { return age; }
      set { age = value; }
    }
    private bool sex;

    [Column(CanBeNull = false, Storage = "sex")]
    public bool Sex
    {
      get { return sex; }
      set { sex = value; }
    }

    private double avgMark;
    [Column(CanBeNull = true, Storage = "avgMark")]
    public double Avg_mark
    {
      get { return avgMark; }
      set { avgMark = value; }
    }
  }
}
